Collected Size Semantics for Functional Programs over Lists
نویسندگان
چکیده
This work introduces collected size semantics of strict functional programs over lists. The collected size semantics of a function definition is a multivalued size function that collects the dependencies between every possible output size and the corresponding input sizes. Such functions annotate standard types and are defined by conditional rewriting rules generated during type inference. We focus on the connection between the rewriting rules and lower and upper bounds on the multivalued size functions, when the bounds are given by piecewise polynomials. We show how, given a set of conditional rewriting rules, one can infer bounds that define an indexed family of polynomials that approximates the multivalued size function. Using collected size semantics we are able to infer non-monotonic and non-linear lower and upper polynomial bounds for many functional programs. As a feasibility study, we use the procedure to infer lower and upper polynomial size-bounds on typical functions of a list library.
منابع مشابه
Collected Size Semantics for Functional Programs ?
This work introduces collected size semantics of strict functional programs over lists. It is presented via non-deterministic numerical functions annotating types. These functions are defined by conditional rewriting rules generated during type inference. We focus on the connection between the size rewriting rules and lower and upper bounds on size dependencies, where the bounds are given by po...
متن کاملCollected Size Semantics for Strict Functional Programs over General Polymorphic Lists
Size analysis can be an important part of heap consumption analysis. This paper is a part of ongoing work about typing support for checking output-on-input size dependencies for function definitions in a strict functional language. A significant restriction for our earlier results is that inner data structures (e.g. in a list of lists) all must have the same size. Here, we make a big step forwa...
متن کاملCollected Size Semantics for Functional Programs over Polymorphic Nested Lists ?
Size analysis is an important prerequisite for heap consumption analysis. This paper is a part of ongoing work about typing support for checking output-on-input size dependencies for function definitions in a strict functional language. A significant restriction for our earlier results is that inner data structures (e.g. in a list of lists) all must have the same size. Here, we make a big step ...
متن کاملPolynomial Size Analysis with Families of Piecewise Polynomials for Functional Programs over Lists ? With soundness proof and examples in detail
Size analysis can play an important role in optimising memory management and in preventing failure due to memory exhaustion. Static size analysis can be performed using size-aware type systems. In size-aware type systems types express output-on-input size dependencies where sizes of outputs depend on sizes of inputs but they do not depend directly on the actual values. We present a novel type s...
متن کاملA Transformation Strategy for Verifying Logic Programs on Infinite Lists
We consider an extension of the class of logic programs, called ω-programs, that can be used to define predicates over infinite lists. The ω-programs allow us to specify properties of the infinite behaviour of reactive systems and, in general, properties of infinite sequences of events. The semantics of ω-programs is an extension of the perfect model semantics. We present a general methodology ...
متن کامل